package com.hobart.learning.lagou.edu.IPersistence.io;

import java.io.InputStream;

/**
 * @author ：hobart
 * @date ：Created in 2020-11-10 11:34
 * @description：读取资源
 * @modified By：
 * @version: 1$
 */
public class Resource {

    // 根据配置文件的路径，将配置文件加载成字节流，存储在内存中
    public static InputStream getResourceAsStream(String resourcePath){
        System.out.println("resourcePath = " +  Resource.class.getResource(resourcePath));
        InputStream resourceAsStream = Resource.class.getResourceAsStream(resourcePath);
        return resourceAsStream;
    }

}
